home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / os2 / gnuwget.zip / wget-1.4.3 / configure.in < prev    next >
Text File  |  1997-01-27  |  4KB  |  157 lines

  1. dnl Template file for GNU Autoconf
  2. dnl Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
  3.  
  4. dnl This program is free software; you can redistribute it and/or modify
  5. dnl it under the terms of the GNU General Public License as published by
  6. dnl the Free Software Foundation; either version 2 of the License, or
  7. dnl (at your option) any later version.
  8.  
  9. dnl This program is distributed in the hope that it will be useful,
  10. dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. dnl GNU General Public License for more details.
  13.  
  14. dnl You should have received a copy of the GNU General Public License
  15. dnl along with this program; if not, write to the Free Software
  16. dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18.  
  19. dnl
  20. dnl Process this file with autoconf to produce a configure script.
  21. dnl
  22.  
  23. AC_INIT(src/version.c)
  24. AC_PREREQ(2.10)
  25. AC_CONFIG_HEADER(config.h)
  26.  
  27. dnl
  28. dnl What version of Wget are we building?
  29. dnl
  30. VERSION=`sed -e 's/^.*"\(.*\)";$/\1/' ${srcdir}/src/version.c`
  31. echo "configuring for $VERSION"
  32. AC_SUBST(VERSION)
  33.  
  34. dnl
  35. dnl Get cannonical host
  36. dnl
  37. AC_CANONICAL_HOST
  38. AC_DEFINE_UNQUOTED(OS_TYPE, "$host_os")
  39.  
  40. dnl
  41. dnl Process features.
  42. dnl
  43. AC_ARG_WITH(socks,
  44. [  --with-socks            use the socks library],
  45. [AC_DEFINE(HAVE_SOCKS)])
  46.  
  47. dnl
  48. dnl Whether make sets $(MAKE)...
  49. dnl
  50. AC_PROG_MAKE_SET
  51.  
  52. dnl
  53. dnl Find a good install
  54. dnl
  55. AC_PROG_INSTALL
  56.  
  57. dnl
  58. dnl Find the compiler
  59. dnl
  60.  
  61. dnl We want these before the checks, so the checks can modify their values.
  62. test -z "$CFLAGS"  && CFLAGS= auto_cflags=1
  63. test -z "$CC" && cc_specified=yes
  64.  
  65. AC_PROG_CC
  66.  
  67. dnl
  68. dnl if the user hasn't specified CFLAGS, then
  69. dnl   if compiler is gcc, then use -O2 and some warning flags
  70. dnl   else use os-specific flags or -O
  71. dnl
  72. if test -n "$auto_cflags"; then
  73.   if test -n "$GCC"; then
  74.     CFLAGS="$CFLAGS -O2 -Wall -Wno-switch -Wno-implicit"
  75.   else
  76.     case "$host_os" in
  77.       *hpux*)  CFLAGS="$CFLAGS +O3"                      ;;
  78.       *ultrix* | *osf*) CFLAGS="$CFLAGS -O -Olimit 2000" ;;
  79.       *)       CFLAGS="$CFLAGS -O" ;;
  80.     esac
  81.   fi
  82. fi
  83.  
  84. dnl
  85. dnl Find makeinfo.  If makeinfo is not found, look for Emacs.  If
  86. dnl Emacs cannot be found, look for XEmacs.
  87. dnl
  88.  
  89. AC_CHECK_PROGS(MAKEINFO, makeinfo emacs xemacs)
  90.  
  91. case "${MAKEINFO}" in
  92.    *makeinfo) MAKEINFO="${MAKEINFO} \$(srcdir)/wget.texi"  ;;
  93.    *emacs | *xemacs) MAKEINFO="${MAKEINFO} -batch -q -no-site-file -eval '(find-file \"\$(srcdir)/wget.texi\")' -l texinfmt -f texinfo-format-buffer -f save-buffer"  ;;
  94.    *) MAKEINFO="makeinfo \$(srcdir)/wget.texi"            ;;
  95. esac
  96.  
  97. dnl
  98. dnl Handle AIX
  99. dnl
  100. AC_AIX
  101.  
  102. dnl
  103. dnl Check if we can handle prototypes.
  104. dnl
  105. AM_C_PROTOTYPES
  106.  
  107. dnl
  108. dnl Checks for typedefs, structures, and compiler characteristics.
  109. dnl
  110. AC_C_CONST
  111. AC_TYPE_SIZE_T
  112.  
  113. dnl
  114. dnl Checks for headers
  115. dnl
  116. AC_CHECK_HEADERS(string.h unistd.h sys/time.h utime.h sys/utime.h sys/select.h)
  117. AC_CHECK_HEADERS(sys/utsname.h sys/systeminfo.h pwd.h signal.h)
  118. AC_HEADER_TIME
  119.  
  120. dnl
  121. dnl Return type of signal-handlers
  122. dnl
  123. AC_TYPE_SIGNAL
  124.  
  125. dnl
  126. dnl Check for struct utimbuf
  127. AM_STRUCT_UTIMBUF
  128.  
  129. dnl
  130. dnl Checks for library functions.
  131. dnl
  132. AC_CHECK_FUNCS(strdup strstr strcasecmp strncasecmp)
  133. AC_CHECK_FUNCS(gettimeofday mktime strptime)
  134. AC_CHECK_FUNCS(strerror select signal symlink)
  135. AC_CHECK_FUNCS(sysinfo gethostname getdomainname)
  136. if test x"$ac_cv_func_getdomainname" = xno; then
  137.   AC_CHECK_LIB(nsl, getdomainname)
  138. fi
  139.  
  140. dnl
  141. dnl Checks for libraries.
  142. dnl
  143.  
  144. AC_CHECK_LIB(socket, socket)
  145.  
  146. if test "x${with_socks}" = xyes
  147. then
  148.   AC_CHECK_LIB(resolv, main)
  149.   AC_CHECK_LIB(socks, Rconnect)
  150. fi
  151.  
  152. dnl
  153. dnl Create output
  154. dnl
  155. AC_OUTPUT(Makefile src/Makefile doc/Makefile util/Makefile,
  156. echo timestamp > stamp-h)
  157.